package com.drzhang.movieticketpicker;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.drzhang.movieticketpicker.view.AudioPlayView;

public class MainActivity extends AppCompatActivity {

    private AudioPlayView recordView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        recordView = (AudioPlayView) findViewById(R.id.recordView);
        recordView.setCountdownTime(200);
        recordView.start();
    }

    @Override
    protected void onPause() {
        super.onPause();
        recordView.pause();
    }

    @Override
    protected void onResume() {
        super.onResume();
        recordView.resume();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        recordView.cancel();
    }
}
